package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_pledge_stat")
public class FPledgeStat {
    @Id
    private Long tid;

    /**
     * TS代码
     */
    @Column(name = "ts_code")
    private String tsCode;

    /**
     * 截止日期
     */
    @Column(name = "end_date")
    private String endDate;

    /**
     * 质押次数
     */
    @Column(name = "pledge_count")
    private Integer pledgeCount;

    /**
     * 无限售股质押数量（万）
     */
    @Column(name = "unrest_pledge")
    private Float unrestPledge;

    /**
     * 限售股份质押数量（万）
     */
    @Column(name = "rest_pledge")
    private Float restPledge;

    /**
     * 总股本
     */
    @Column(name = "total_share")
    private Float totalShare;

    /**
     * 质押比例
     */
    @Column(name = "pledge_ratio")
    private Float pledgeRatio;

    public FPledgeStat(Long tid, String tsCode, String endDate, Integer pledgeCount, Float unrestPledge, Float restPledge, Float totalShare, Float pledgeRatio) {
        this.tid = tid;
        this.tsCode = tsCode;
        this.endDate = endDate;
        this.pledgeCount = pledgeCount;
        this.unrestPledge = unrestPledge;
        this.restPledge = restPledge;
        this.totalShare = totalShare;
        this.pledgeRatio = pledgeRatio;
    }

    public FPledgeStat() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取TS代码
     *
     * @return ts_code - TS代码
     */
    public String getTsCode() {
        return tsCode;
    }

    /**
     * 设置TS代码
     *
     * @param tsCode TS代码
     */
    public void setTsCode(String tsCode) {
        this.tsCode = tsCode;
    }

    /**
     * 获取截止日期
     *
     * @return end_date - 截止日期
     */
    public String getEndDate() {
        return endDate;
    }

    /**
     * 设置截止日期
     *
     * @param endDate 截止日期
     */
    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    /**
     * 获取质押次数
     *
     * @return pledge_count - 质押次数
     */
    public Integer getPledgeCount() {
        return pledgeCount;
    }

    /**
     * 设置质押次数
     *
     * @param pledgeCount 质押次数
     */
    public void setPledgeCount(Integer pledgeCount) {
        this.pledgeCount = pledgeCount;
    }

    /**
     * 获取无限售股质押数量（万）
     *
     * @return unrest_pledge - 无限售股质押数量（万）
     */
    public Float getUnrestPledge() {
        return unrestPledge;
    }

    /**
     * 设置无限售股质押数量（万）
     *
     * @param unrestPledge 无限售股质押数量（万）
     */
    public void setUnrestPledge(Float unrestPledge) {
        this.unrestPledge = unrestPledge;
    }

    /**
     * 获取限售股份质押数量（万）
     *
     * @return rest_pledge - 限售股份质押数量（万）
     */
    public Float getRestPledge() {
        return restPledge;
    }

    /**
     * 设置限售股份质押数量（万）
     *
     * @param restPledge 限售股份质押数量（万）
     */
    public void setRestPledge(Float restPledge) {
        this.restPledge = restPledge;
    }

    /**
     * 获取总股本
     *
     * @return total_share - 总股本
     */
    public Float getTotalShare() {
        return totalShare;
    }

    /**
     * 设置总股本
     *
     * @param totalShare 总股本
     */
    public void setTotalShare(Float totalShare) {
        this.totalShare = totalShare;
    }

    /**
     * 获取质押比例
     *
     * @return pledge_ratio - 质押比例
     */
    public Float getPledgeRatio() {
        return pledgeRatio;
    }

    /**
     * 设置质押比例
     *
     * @param pledgeRatio 质押比例
     */
    public void setPledgeRatio(Float pledgeRatio) {
        this.pledgeRatio = pledgeRatio;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", tsCode=").append(tsCode);
        sb.append(", endDate=").append(endDate);
        sb.append(", pledgeCount=").append(pledgeCount);
        sb.append(", unrestPledge=").append(unrestPledge);
        sb.append(", restPledge=").append(restPledge);
        sb.append(", totalShare=").append(totalShare);
        sb.append(", pledgeRatio=").append(pledgeRatio);
        sb.append("]");
        return sb.toString();
    }
}